<template>
	<view>
		<view class="" :style="'height: '+statusBarHeight+'px;'"></view>
		<view class="mytop">
			<view class="" style="width: 28rpx;"></view>
			<view class="">我的</view>
			<image src="../../static/my/set.png" mode="" @click="$fun.jump('./setup')"></image>
		</view>
		<view class="main">
			<view class="main_top flex">
				<image src="../../static/my/my(1).png" mode=""></image>
				<view class="">
					<view class="name">哈哈哈</view>
					<view class="id">UID 123456789</view>
				</view>
			</view>
			<view class="main_bottom flex">
				<view class="box">
					<view class="textname">分红收益</view>
					<view class="num">1234.56</view>
				</view>
				<view class="box">
					<view class="textname">销售收益</view>
					<view class="num">5678.91</view>
				</view>
				<view class="box">
					<view class="textname">节点收益</view>
					<view class="num">1234.56</view>
				</view>
				<view class="box">
					<view class="textname">积分</view>
					<view class="num">5678.92</view>
				</view>
			</view>
		</view>
		<view class="mylist flex-between radius" @click="$fun.jump('./accSecurity')">
			<view class="mylist_left flex">
				<image src="../../static/my/my(6).png" mode=""></image>
				<view class="name">账号与安全</view>
			</view>
			<image src="../../static/wallet/goin.png" mode=""></image>
		</view>
		<view class="mylist flex-between" @click="$fun.jump('./realname')">
			<view class="mylist_left flex">
				<image src="../../static/my/my(2).png" mode=""></image>
				<view class="name">实名认证</view>
			</view>
			<image src="../../static/wallet/goin.png" mode=""></image>
		</view>
		<view class="mylist flex-between" @click="$fun.jump('./payment')">
			<view class="mylist_left flex">
				<image src="../../static/my/my(3).png" mode=""></image>
				<view class="name">收款方式</view>
			</view>
			<image src="../../static/wallet/goin.png" mode=""></image>
		</view>
		<view class="mylist flex-between" @click="$fun.jump(`./invitefriends`)">
			<view class="mylist_left flex">
				<image src="../../static/my/my(5).png" mode=""></image>
				<view class="name">邀请好友</view>
			</view>
			<image src="../../static/wallet/goin.png" mode=""></image>
		</view>
		<view class="mylist flex-between" @click="$fun.jump(`/pages/index/notifications?type=0&name=公告`)">
			<view class="mylist_left flex">
				<image src="../../static/my/my(4).png" mode=""></image>
				<view class="name">系统消息</view>
			</view>
			<image src="../../static/wallet/goin.png" mode=""></image>
		</view>
		<view class="mylist flex-between radius2" @click="show=true">
			<view class="mylist_left flex">
				<image src="../../static/my/my(1).png" mode=""></image>
				<view class="name">客服</view>
			</view>
			<image src="../../static/wallet/goin.png" mode=""></image>
		</view>
		<u-overlay :show="show" @click="show = false">
			<view class="model">
				<view class="showservice">
					<view class="flex">
						<view class="">请联系QQ：571018999</view>
						<image src="../../static/wallet/copy.png" @click="copy('571018999')" mode=""></image>
					</view>
				</view>
				<image class="del" @click="show = false" src="../../static/my/del.png" mode=""></image>
			</view>
		</u-overlay>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBarHeight: 0,
				show: false
			}
		},
		onShow() {
			const phoneInfo = uni.getSystemInfoSync(); // 获取手机系统信息
			this.statusBarHeight = phoneInfo.statusBarHeight
		},
		methods: {
			copy(text) {
				uni.setClipboardData({
					data: text,
					success: () => {
						this.showToast && uni.$u.toast('复制成功')
					},
					fail: () => {
						this.showToast && uni.$u.toast('复制失败')
					},
					complete: () => {
						// this.showTooltip = false
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		width: 100%;
		height: 100%;
		background-image: url('../../static/my/bgmine@2x.png');
		background-size: 100% 320rpx;
		background-repeat: no-repeat;
	}

	.mytop {
		width: 750rpx;
		height: 88rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 34rpx;
		box-sizing: border-box;
		font-family: PingFangSC, PingFang SC;
		font-weight: 600;
		font-size: 36rpx;
		color: #333333;

		image {
			width: 48rpx;
			height: 48rpx;
		}
	}

	.main {
		width: 690rpx;
		height: 284rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		padding: 30rpx;
		box-sizing: border-box;
		margin: 0 auto 60rpx;

		&_top {
			align-items: center;

			image {
				width: 120rpx;
				height: 120rpx;
				margin-right: 20rpx;
				border-radius: 50%;
			}

			.name {
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 40rpx;
				color: #333333;
			}

			.id {
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #999999;
				margin-top: 10rpx;
			}
		}

		&_bottom {
			margin-top: 40rpx;

			.box {
				width: 25%;
			}

			.textname {
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #999999;
			}

			.num {
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: #333333;
				margin-top: 10rpx;
			}
		}
	}

	.mylist {
		width: 690rpx;
		height: 100rpx;
		background: #FFFFFF;
		// border-radius: 24rpx 24rpx 0rpx 0rpx;
		margin: 0 auto;
		padding: 25rpx 30rpx;
		box-sizing: border-box;
		align-items: center;

		&_left {
			font-family: PingFangSC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #333333;
			align-items: center;

			image {
				width: 56rpx;
				height: 56rpx;
				margin-right: 20rpx;
			}
		}

		image {
			width: 48rpx;
			height: 48rpx;
		}
	}

	.radius {
		border-radius: 24rpx 24rpx 0rpx 0rpx;
	}

	.radius2 {
		border-radius: 0rpx 0rpx 24rpx 24rpx;
	}

	.model {
		position: fixed;
		top: 30%;
		left: 95rpx;

		.del {
			width: 53rpx;
			height: 53rpx;
			position: absolute;
			bottom: -80rpx;
			left: 245rpx;
		}
	}

	.showservice {
		width: 560rpx;
		height: 200rpx;
		background: #FFFFFF;
		border-radius: 24rpx;

		font-weight: 500;
		font-size: 28rpx;
		color: #19181A;
		text-align: center;
		display: flex;
		justify-content: center;

		image {
			width: 32rpx;
			height: 32rpx;
			margin-left: 10rpx;
		}
	}
</style>